<template>
    <h2>父组件</h2>
    <SlotSon3 v-slot="{msg, num}">
        <div>msg：{{ msg }}</div>
        <div>num：{{ num }}</div>
    </SlotSon3>
    <hr/>
    <SlotSon3>
        <template v-slot="data">
            <div>msg：{{ data.msg }}</div>
            <div>num：{{ data.num }}</div>
        </template>
        <template #slot1="{ msg, flag }">
            <div>msg：{{ msg }}</div>
            <div>flag：{{ flag ? '对的' : '错的' }}</div>
        </template>
    </SlotSon3>
</template>
<script setup>
import SlotSon3 from './components/SlotSon3.vue' 

let obj = {name: '张三', age: 20}
let {name, age} = obj
</script>
<style scoped>
    
</style>